//
// Created by TianBo on 2022/6/4.
//

//动归

#include "iostream"
#include "string"
#include "vector"

using namespace std;

class Solution {
public:
    int translateNum(int num) {
        string str = to_string(num);
        vector<int> dp(str.size() + 1);
        dp[0] = 1;
        dp[1] = 1;

        for (int i = 2; i <= str.size(); ++i) {
            int n = (str[i-2] - '0') * 10 + (str[i-1] - '0');
            if(n >= 10 && n <= 25)
                dp[i] = dp[i-1] + dp[i-2];
            else
                dp[i] = dp[i-1];
        }
        return dp[str.size()];
    }
};

int main()
{
    Solution s;
    int num = 18822;
    cout<<s.translateNum(num);
    return 0;
}

